package edu.gatech.stolen.tea.login;

import edu.gatech.stolen.tea.R;
import edu.gatech.stolen.tea.R.id;
import edu.gatech.stolen.tea.R.layout;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class Registered extends Activity {
	
	public static final String TAG = "Registered Page";
	
	private Button returnToLogin;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
    	Log.v(TAG, "Activity State: onCreate()");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.registered);
    	
        returnToLogin = (Button) findViewById(R.id.bToAppButton_registered);
        
        returnToLogin.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				onReturnToLoginClicked();
				
			}
        });        
    }
    
    /**
     * if button clicked, go to login screen
     */
    private void onReturnToLoginClicked(){
    	
    	Log.v(TAG, "ReturnToLogin Button Clicked");
    	goToLoginPage();
    	
    }
    
    /**
     * go to login screen
     */
    protected void goToLoginPage() {
    	
    	Intent i = new Intent(this, LoginActivity.class);
    	startActivity(i);
    	
    }  
}